#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct element{
    char *data;
    struct element * prev;
    struct element * next;
};
struct element * creat_element(char * data){
    struct element * elem=(struct element *)malloc(sizeof(struct element));
    int data_len=strlen(data)+1;
    elem->data=(char *)malloc(sizeof(char)*data_len);
    strcpy(elem->data,data);
    elem->prev=NULL;
    elem->next=NULL;
    return elem;
};
void print_element(struct element * elem){
         printf("data:%s \t prev:%p \t next:%p\n",elem->data,elem->prev,elem->next);
         
}
struct double_linked_list{
    struct element * head;
    struct element * tail;
};

struct double_linked_list * cteat_double_linked_list(struct element * elem){
    struct double_linked_list * lst=(struct double_linked_list *)malloc(sizeof(struct double_linked_list));
   lst->head=elem;
   lst->tail=elem;
   lst->head->next=lst->tail;
   lst->tail->prev=lst->head;
    return lst;


    }


int main(){
    char data[20];
    struct element * elem;
    scanf("%s",data);
    elem=creat_element(data);
    print_element(elem);
    return 0;
}